Skip to content

Fix as_ptr_cast_mut FP when self is not mutable #15266

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

profetia
Copy link
Contributor

@profetia profetia commented Jul 13, 2025

Closes #15259

changelog: [as_ptr_cast_mut] fix FP when self is not mutable

@rustbot
Copy link
Collaborator

rustbot commented Jul 13, 2025

r? @Alexendoo

rustbot has assigned @Alexendoo.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Jul 13, 2025
Copy link

github-actions bot commented Jul 13, 2025

Lintcheck changes for 8b920b6

Lint Added Removed Changed
clippy::as_ptr_cast_mut 0 7 0

This comment will be updated if you push new changes

@profetia
Copy link
Contributor Author

r? clippy

@rustbot rustbot assigned llogiq and unassigned Alexendoo Aug 11, 2025
@Jarcho
Copy link
Contributor

Jarcho commented Aug 13, 2025

The reproducer in that issue is UB, so this should still be linting. The suggestion's applicability is MaybeIncorrect so it's allowed to be incomplete/uncompileable. The only thing that could be changed is extending the suggestion to add mut where it's needed.

@profetia
Copy link
Contributor Author

Should we just ignore it if it is a UB?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties
Projects
None yet
Development

Successfully merging this pull request may close these issues.

as-ptr-cast-mut causes type error
5 participants